using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Middleware;
using Middleware.Naming;

namespace Calculator.Server {

    class Program {
        
        static void Main(string[] args) {
            
            NamingStub _namingStub = new NamingStub();

            Console.WriteLine("Calculator Server");
            Console.WriteLine();

            Console.WriteLine("Creating and registering remote object...");
            CalculatorImpl calc = new CalculatorImpl();
            _namingStub.Bind("Calculator", calc);

            Console.WriteLine("Running service...");
            CalculatorService service = new CalculatorService();
            service.Start();
        }
    }
}
